package com.liao.ticket.util;

public class CheckPowerUtils {
    public static Long getMid(Integer type) {
        type = type/10*10;
        if (type == 0) {
            if(AdminThreadLocal.get() != null){
                return 0l;
            }
        }else if(type == 20){
            if(AirportThreadLocal.get() != null){
                return AirportThreadLocal.get().getManagerId();
            }
        }else if(type == 30){
            if(AirlineThreadLocal.get() != null){
                return AirlineThreadLocal.get().getManagerId();
            }
        }
        return null;
    }
}
